inspector: Show child bounds for repeat nodes
authorMatthias Clasen <mclasen@redhat.com>
Sun, 8 Oct 2017 12:43:03 +0000 (08:43 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 8 Oct 2017 13:02:35 +0000 (09:02 -0400)
The more information, the better.

gtk/inspector/recorder.c

index 7f2ed0aeea037f9593d349aa7bb5ce51dbfbd4ee..eac8fafe280e444064a19762ead62d64c1a61a7b 100644 (file)
@@ -502,11 +502,24 @@ populate_render_node_properties (GtkListStore  *store,
       }
       break;
 
+    case GSK_REPEAT_NODE:
+      {
+        const graphene_rect_t *child_bounds = gsk_repeat_node_peek_child_bounds (node);
+
+        tmp = g_strdup_printf ("%.2f x %.2f + %.2f + %.2f",
+                               child_bounds->size.width,
+                               child_bounds->size.height,
+                               child_bounds->origin.x,
+                               child_bounds->origin.y);
+        add_text_row (store, "Child Bounds", tmp);
+        g_free (tmp);
+     }
+      break;
+
     case GSK_NOT_A_RENDER_NODE:
     case GSK_CONTAINER_NODE:
     case GSK_TRANSFORM_NODE:
     case GSK_COLOR_MATRIX_NODE:
-    case GSK_REPEAT_NODE:
     case GSK_CLIP_NODE:
     case GSK_ROUNDED_CLIP_NODE:
     case GSK_SHADOW_NODE: